import React, { FC, forwardRef } from 'react';
import Toolbar from './Toolbar';
// import Search from './Search';
interface IProps {
  readOnly: Boolean;
  viewMode?: string;
}
const TableBottom = forwardRef((props: IProps, ref: any) => {
  const { readOnly, viewMode } = props

  // const { search, searchField } = useContext(InBizTableCtx);
  return (
    <div className="subtable-action">
      <div>
        {/* 此处通过readOnly判断是否显示添加按钮,readOnly为true,isDesigner时隐藏 */}
        {viewMode != 'look' ? <Toolbar readOnly={readOnly} /> : null}
      </div>
    </div>
  );

})

export default React.memo(TableBottom);
